package cn.likole.oj.bean;

import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Id;
import org.nutz.dao.entity.annotation.ManyMany;
import org.nutz.dao.entity.annotation.Table;

import java.util.List;

/**
 * Created by likole on 7/25/18.
 * 教程
 */
@Table("tutorial")
public class Tutorial {

    /**
     * 教程编号
     */
    @Id
    private int tutorialId;

    /**
     * 章
     */
    @Column
    private int chapter;

    /**
     * 节
     */
    @Column
    private int section;

    /**
     * 标题
     */
    @Column
    private String title;

    /**
     * 描述
     */
    @Column
    private String description;

    /**
     * 引导性章节
     */
    @Column
    private boolean introduction;

    @ManyMany(relation = "tutorial_problem",from = "tutorial_id",to="problem_id")
    private List<Problem> problems;

    public int getTutorialId() {
        return tutorialId;
    }

    public void setTutorialId(int tutorialId) {
        this.tutorialId = tutorialId;
    }


    public boolean isIntroduction() {
        return introduction;
    }

    public void setIntroduction(boolean introduction) {
        this.introduction = introduction;
    }


    public int getChapter() {
        return chapter;
    }

    public void setChapter(int chapter) {
        this.chapter = chapter;
    }

    public int getSection() {
        return section;
    }

    public void setSection(int section) {
        this.section = section;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public List<Problem> getProblems() {
        return problems;
    }

    public void setProblems(List<Problem> problems) {
        this.problems = problems;
    }
}
